package gui;

import interfaces.Command;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import mediator.Mediator;

public class LoginBtn extends JButton implements Command {

	Mediator med;
	
	public LoginBtn (ActionListener act, Mediator md) {
		super("Login");
		addActionListener(act);
		med = md;
		med.registerLoginBtn(this);
		setToolTipText("Press this Button to Login to Application");
	}
	
	@Override
	public void execute() {
		med.login();
	}

}
